<table class="table1">
	<tr>
						<th class="w150">属性值</th>
						<td>
							<ul id="selectField">
								<?php 
								$index=0;
								foreach($AttrValueData as $d):
									$index++;
								?>
								<li>
								<input type="text" name="attr_value[]" class="w200" value="<?php echo $d['attr_value'];?>"> 
								<?php if($index==1):?>
								<button type="button" class="hd-cancel" onclick="addField()">增加(+)</button>
							<?php else:?>
							<button type="button" class="hd-cancel" onclick="removeField(this)">删除(-)</button></li>
						<?php endif;?>
							</li>
						<?php endforeach;?>
						</ul>
						</td>
					</tr>
				</table>
<script>
	//添加表单
	function addField(){
		var html = '<li><input type="text" name="attr_value[]" class="w200"> <button type="button" class="hd-cancel" onclick="removeField(this)">删除(-)</button></li>';
		$("#selectField").append(html);
	}
	//移除表单
	function removeField(obj){
		$(obj).parent().remove();
	}
</script>